package com.njwb.day15.zqzb.jdbc03;

import java.util.Scanner;

public class StudentManager {
    public static void main(String[] args) {
        showMenu();
    }
    public static void showMenu(){

        Scanner scanner = new Scanner(System.in);
        do{
            System.out.println("-----------------------------");
            System.out.println("1、添加学生");
            System.out.println("2、修改学生");
            System.out.println("3、删除学生");
            System.out.println("4、查询所有学生");
            System.out.println("5、退出");
            System.out.println("-----------------------------");
            System.out.println("请选择：");
            int choice = scanner.nextInt();
            switch (choice) {
                case 1:
                    AddStudent.add();
                    continue;
                case 2:
                    UpdateStudent.update();
                    continue;
                case 3:
                    DeleteStudent.detele();
                    continue;
                case 4:
                    QueryStudents.query();
                    continue;
                case 5:
                default:
                    break;
            }
            break;

        }while(true);
    }
}
